#!/bin/sh
cd /sys/class/gpio
echo 123 >export
cd gpio123
echo out > direction
echo 1 > value
while :
do
ps -fe|grep tw_em |grep -v grep
if [ $? -ne 0 ]
then
echo 0 > value
else
echo 1 > value
fi
sleep 1
done
